import { defineStore } from 'pinia'

export const useAppStore = defineStore('app', {
  state() {
    return {
      refreshKey: 0,
      sidebar: {
        opened: false
      }
    }
  },
  actions: {
    refresh() {
      this.refreshKey++
    },
    toggleSideBar() {
      this.sidebar.opened = !this.sidebar.opened
    }
  }
})
